package util;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;

import java.util.Map;

@Slf4j
public class SignAccountUtil {

    private static final String SUFFIX = "2020zyt[]";

    public static String sign (Map<String, Object> map) {
        if (CollectionUtils.isEmpty(map)) return null;
        String req = JSON.toJSONString(map) + SUFFIX;
        req = MD5Utils.md5(req);
        log.info("account request sign:{}", req);
        return req;
    }
}
